In network systems wherein a clock signal is recovered from the received data, temporary stores, particularly FIFOs, are used to transfer the data from the clock domain of the receive data to the system clock domain of the receiving unit. If units are connected together as in a ring or cascade, the transmitter of one unit is the source of the recovered clock for the next unit. The source of a transmit clock for a unit may be a crystal or other substantially stable clock source. However, these clock sources generally are allowed to exhibit a certain tolerance in frequency and in practice the clock sources in a given system will all be at very slightly different frequencies. In any one unit the recovered clock and the system clock may be at approximately the same nominal fundamental frequency but will differ due to tolerances in the clock sources. A difference in the clock frequencies is generally specified and controlled for a particular interface to ensure correct operation. A tolerance of one hundred parts per million greater or less than a nominal frequency would be a typical example; thus a clock frequency of a gigahertz may be permitted to vary up to 100 Kilohertz above or below the nominal 1 gigahertz frequency.
In a system wherein the system clock of one unit, i.e. a transmitter of a packet, is at the upper range of the frequency tolerance and the system clock of the next unit (the receiver) is at the lower range there will be a difference in frequency of up to two hundred parts per million. This means that the receiver unit's system clock will lag the transmitter unit's system clock by two hundred clock cycles for every million clock cycles. If the receiver unit were trying to write a byte of data in each recovered clock cycle it would have to discard two hundred bytes for every million bytes, that is to say one byte for every five thousand bytes to prevent the filling of the receive FIFO.
Inter-packet gaps are constituted by ‘idle’ bytes that are placed between data packets to allow a receiver to discard bytes without using ‘real’, namely active data constituting part of a data packet. Network standards, such as the Standard indicated above, define the minimum inter-packet gap that is required. For Ethernet packets the standard inter-packet gap is twelve bytes.
It is normal practice for the receiver not to write the bytes of the inter-packet gap to a receive FIFO along with the recovered clock and to organise the read process so that the IPG should be reinserted. This may be done by causing a state machine, after it has read a packet, to produce ‘idle’ bytes until (in its own clock cycle) it detects that the write pointer has moved an appropriate distance (number of entries). If the system clock and the recovered clock were exactly the same, the data would be read from the FIFO and the same inter-packet gap would be applied. If the clocks are different then the inter-packet gap will be lost or gained. The gain of inter-packet gap is not important, because the gain will disappear at the next unit when the IPG is not written. However, the loss of inter-packet gap is more problematic, particularly in a cascade.
In such a case bytes of inter-packet gap may be lost at several nodes. In a worst case, for a particular packet a byte of inter-packet gap may be lost at each node on a ring or in a cascade and when the packets arrive at the last node on the ring the inter-packet gap has shrunk so much that the node cannot correctly receive the packet.
A current solution is to compensate for the worst case by arbitrarily increasing the number of idle bytes in an inter-packet gap such that in the worst case where a byte is lost at each interface the number of bytes of inter-packet gap received at the end of the ring is sufficient for the packet to be recovered correctly. In an M node ring wherein one byte might be lost at each node and N bytes of IPG are required for correct reception then the packet needs to commence its journey around the ring with M+N bytes of inter-packet gap. Since however by definition the inter-packet gap bytes carry no useful information, such an increase in the inter-packet gap will result in a decrease in performance.
Although it is convenient to describe the invention in terms of a gap consisting of bytes, in a more general case it may be constituted by words which are of greater or lesser length than a byte.